package com.waiting.string;

/**
 * @author bjweitingting
 * @description
 * @date 2018/9/3
 **/
public class SplitMain {
    public static void main(String[] args) {
        String test = "[5821490237@chatroom][wxid_uncanbg3q72i22]";
        String[] result = test.split("[\\]\\[]");
        for (int i = 0; i < result.length; i++) {
            System.out.println(result[i]+"-"+i);
        }
    }
}
